3.1.10 \(\int \frac {\csc ^3(x)}{a+a \sin (x)} \, dx\) [10]

Optimal. Leaf size=42 \[ -\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {2 \cot (x)}{a}-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc (x)}{a+a \sin (x)} \]

[Out]

-3/2*arctanh(cos(x))/a+2*cot(x)/a-3/2*cot(x)*csc(x)/a+cot(x)*csc(x)/(a+a*sin(x))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {2847, 2827, 3853, 3855, 3852, 8} \begin {gather*} \frac {2 \cot (x)}{a}-\frac {3 \tanh ^{-1}(\cos (x))}{2 a}-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc (x)}{a \sin (x)+a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3/(a + a*Sin[x]),x]

[Out]

(-3*ArcTanh[Cos[x]])/(2*a) + (2*Cot[x])/a - (3*Cot[x]*Csc[x])/(2*a) + (Cot[x]*Csc[x])/(a + a*Sin[x])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2827

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 2847

Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b
^2)*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(b*c - a*d)*(a + b*Sin[e + f*x]))), x] + Dist[d/(a*(b*c -
a*d)), Int[(c + d*Sin[e + f*x])^n*(a*n - b*(n + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && Ne
Q[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[n, 0] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\csc ^3(x)}{a+a \sin (x)} \, dx &=\frac {\cot (x) \csc (x)}{a+a \sin (x)}-\frac {\int \csc ^3(x) (-3 a+2 a \sin (x)) \, dx}{a^2}\\ &=\frac {\cot (x) \csc (x)}{a+a \sin (x)}-\frac {2 \int \csc ^2(x) \, dx}{a}+\frac {3 \int \csc ^3(x) \, dx}{a}\\ &=-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc (x)}{a+a \sin (x)}+\frac {3 \int \csc (x) \, dx}{2 a}+\frac {2 \text {Subst}(\int 1 \, dx,x,\cot (x))}{a}\\ &=-\frac {3 \tanh ^{-1}(\cos (x))}{2 a}+\frac {2 \cot (x)}{a}-\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc (x)}{a+a \sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 83, normalized size = 1.98 \begin {gather*} \frac {4 \cot \left (\frac {x}{2}\right )-\csc ^2\left (\frac {x}{2}\right )-12 \log \left (\cos \left (\frac {x}{2}\right )\right )+12 \log \left (\sin \left (\frac {x}{2}\right )\right )+\sec ^2\left (\frac {x}{2}\right )-\frac {16 \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}-4 \tan \left (\frac {x}{2}\right )}{8 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3/(a + a*Sin[x]),x]

[Out]

(4*Cot[x/2] - Csc[x/2]^2 - 12*Log[Cos[x/2]] + 12*Log[Sin[x/2]] + Sec[x/2]^2 - (16*Sin[x/2])/(Cos[x/2] + Sin[x/
2]) - 4*Tan[x/2])/(8*a)

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 54, normalized size = 1.29

method result size
default \(\frac {\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}-2 \tan \left (\frac {x}{2}\right )-\frac {1}{2 \tan \left (\frac {x}{2}\right )^{2}}+\frac {2}{\tan \left (\frac {x}{2}\right )}+6 \ln \left (\tan \left (\frac {x}{2}\right )\right )+\frac {8}{\tan \left (\frac {x}{2}\right )+1}}{4 a}\) \(54\)
norman \(\frac {\frac {3 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{a}-\frac {1}{8 a}+\frac {3 \tan \left (\frac {x}{2}\right )}{8 a}-\frac {3 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{8 a}+\frac {\tan ^{5}\left (\frac {x}{2}\right )}{8 a}}{\tan \left (\frac {x}{2}\right )^{2} \left (\tan \left (\frac {x}{2}\right )+1\right )}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a}\) \(75\)
risch \(\frac {3 \,{\mathrm e}^{4 i x}-5 \,{\mathrm e}^{2 i x}+3 i {\mathrm e}^{3 i x}+4-i {\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2} \left ({\mathrm e}^{i x}+i\right ) a}-\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{2 a}+\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{2 a}\) \(83\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3/(a+a*sin(x)),x,method=_RETURNVERBOSE)

[Out]

1/4/a*(1/2*tan(1/2*x)^2-2*tan(1/2*x)-1/2/tan(1/2*x)^2+2/tan(1/2*x)+6*ln(tan(1/2*x))+8/(tan(1/2*x)+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (38) = 76\).
time = 0.31, size = 97, normalized size = 2.31 \begin {gather*} -\frac {\frac {4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}}{8 \, a} + \frac {\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {20 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1}{8 \, {\left (\frac {a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {a \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}} + \frac {3 \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+a*sin(x)),x, algorithm="maxima")

[Out]

-1/8*(4*sin(x)/(cos(x) + 1) - sin(x)^2/(cos(x) + 1)^2)/a + 1/8*(3*sin(x)/(cos(x) + 1) + 20*sin(x)^2/(cos(x) +
1)^2 - 1)/(a*sin(x)^2/(cos(x) + 1)^2 + a*sin(x)^3/(cos(x) + 1)^3) + 3/2*log(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (38) = 76\).
time = 0.41, size = 134, normalized size = 3.19 \begin {gather*} \frac {8 \, \cos \left (x\right )^{3} + 6 \, \cos \left (x\right )^{2} - 3 \, {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} + {\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) - \cos \left (x\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} + {\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) - \cos \left (x\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 2 \, {\left (4 \, \cos \left (x\right )^{2} + \cos \left (x\right ) - 2\right )} \sin \left (x\right ) - 6 \, \cos \left (x\right ) - 4}{4 \, {\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) + {\left (a \cos \left (x\right )^{2} - a\right )} \sin \left (x\right ) - a\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+a*sin(x)),x, algorithm="fricas")

[Out]

1/4*(8*cos(x)^3 + 6*cos(x)^2 - 3*(cos(x)^3 + cos(x)^2 + (cos(x)^2 - 1)*sin(x) - cos(x) - 1)*log(1/2*cos(x) + 1
/2) + 3*(cos(x)^3 + cos(x)^2 + (cos(x)^2 - 1)*sin(x) - cos(x) - 1)*log(-1/2*cos(x) + 1/2) - 2*(4*cos(x)^2 + co
s(x) - 2)*sin(x) - 6*cos(x) - 4)/(a*cos(x)^3 + a*cos(x)^2 - a*cos(x) + (a*cos(x)^2 - a)*sin(x) - a)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc ^{3}{\left (x \right )}}{\sin {\left (x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3/(a+a*sin(x)),x)

[Out]

Integral(csc(x)**3/(sin(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 73, normalized size = 1.74 \begin {gather*} \frac {3 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, a} + \frac {a \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, x\right )}{8 \, a^{2}} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} - \frac {18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{8 \, a \tan \left (\frac {1}{2} \, x\right )^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+a*sin(x)),x, algorithm="giac")

[Out]

3/2*log(abs(tan(1/2*x)))/a + 1/8*(a*tan(1/2*x)^2 - 4*a*tan(1/2*x))/a^2 + 2/(a*(tan(1/2*x) + 1)) - 1/8*(18*tan(
1/2*x)^2 - 4*tan(1/2*x) + 1)/(a*tan(1/2*x)^2)

________________________________________________________________________________________

Mupad [B]
time = 6.60, size = 69, normalized size = 1.64 \begin {gather*} \frac {10\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\frac {3\,\mathrm {tan}\left (\frac {x}{2}\right )}{2}-\frac {1}{2}}{4\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+4\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2\,a}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,a}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2\,a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)^3*(a + a*sin(x))),x)

[Out]

((3*tan(x/2))/2 + 10*tan(x/2)^2 - 1/2)/(4*a*tan(x/2)^2 + 4*a*tan(x/2)^3) - tan(x/2)/(2*a) + tan(x/2)^2/(8*a) +
 (3*log(tan(x/2)))/(2*a)

________________________________________________________________________________________